package com.bdqn.service;

import com.bdqn.mapper.RoomMapper;
import com.bdqn.pojo.Room;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service("roomService")
public class RoomServiceimpl implements RoomService {
    @Resource
    RoomMapper roomMapper;
    @Override
    public int add(Room room) {
       return roomMapper.add(room);
    }

    @Override
    public int edit(Room room) {
        return roomMapper.edit(room);
    }

    @Override
    public int delete(Long id) {
        return  roomMapper.delete(id);
    }

    @Override
    public List<Room> findList(Map<String, Object> queryMap) {

        return roomMapper.findList(queryMap);
    }

    @Override
    public List<Room> findAll() {
        return roomMapper.findAll();
    }

    @Override
    public Integer getTotal(Map<String, Object> queryMap) {
        return roomMapper.getTotal(queryMap);
    }

    @Override
    public Room find(Long id) {
        return roomMapper.find(id);
    }

    @Override
    public Room findBySn(String sn) {
        return  roomMapper.findBySn(sn);
    }
}
